<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var sum = 0;
        var num = 0

        function isPrime(num) {
            var flag = true;
            for (var i = 2; i < num; i++) {
                if (0 == num % i) {
                    flag = false;
                }
            }
            return flag;
        }

        function isGdbh() {
            var isFlag = false
            for (var i = 6; i < 10000; i += 2) {
                for (var j = 2; j <= i; j++) {
                    var k = i - j
                    if (isPrime(k) && isPrime(j)) {
                        sum += 1;
                        isFlag = true
                        break
                    }
                }
                if (isFlag) {
                    num += 1
                }
            }
            if (num == sum) {

                console.log("哥德巴赫猜想成立");
            } else {
                console.log("哥德巴赫猜想不成立");
            }


        }
        isGdbh()



    </script>
</head>

<body>

</body>

</html>